.class public Lrexsee/core/browser/RexseeBrowserStyle;
.super Ljava/lang/Object;
.source "RexseeBrowserStyle.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "BrowserStyle"


# instance fields
.field private final mActivity:Landroid/app/Activity;

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mDiv:Lrexsee/core/widget/Div;

.field private syncTag:Z


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 26
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->syncTag:Z

    .line 30
    iput-object p1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mBrowser:Lrexsee/core/browser/Browser;

    .line 31
    iget-object v0, p1, Lrexsee/core/browser/Browser;->containerDiv:Lrexsee/core/widget/Div;

    iput-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    .line 32
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    iput-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mActivity:Landroid/app/Activity;

    .line 33
    return-void
.end method

.method static synthetic access$0(Lrexsee/core/browser/RexseeBrowserStyle;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 24
    iget-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/core/browser/RexseeBrowserStyle;)Lrexsee/core/widget/Div;
    .locals 1

    .prologue
    .line 25
    iget-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    return-object v0
.end method

.method static synthetic access$2(Lrexsee/core/browser/RexseeBrowserStyle;Z)V
    .locals 0

    .prologue
    .line 26
    iput-boolean p1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->syncTag:Z

    return-void
.end method


# virtual methods
.method public getCurrentStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 58
    iget-object v1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    invoke-virtual {v1, p1}, Lrexsee/core/widget/Div;->getStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 59
    .local v0, "value":Ljava/lang/String;
    if-nez v0, :cond_0

    const-string v1, ""

    :goto_0
    return-object v1

    :cond_0
    move-object v1, v0

    goto :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 16
    new-instance v0, Lrexsee/core/browser/RexseeBrowserStyle;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseeBrowserStyle;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 12
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "BrowserStyle"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 20
    new-instance v0, Lrexsee/core/browser/RexseeBrowserStyle;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseeBrowserStyle;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 54
    iget-object v1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    iget-object v1, v1, Lrexsee/core/widget/Div;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1, p1}, Lrexsee/core/style/StyleSheet;->getStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 55
    .local v0, "value":Ljava/lang/String;
    if-nez v0, :cond_0

    const-string v1, ""

    :goto_0
    return-object v1

    :cond_0
    move-object v1, v0

    goto :goto_0
.end method

.method public setStyle(Ljava/lang/String;)V
    .locals 2
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 36
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->syncTag:Z

    .line 37
    iget-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mActivity:Landroid/app/Activity;

    new-instance v1, Lrexsee/core/browser/RexseeBrowserStyle$1;

    invoke-direct {v1, p0, p1}, Lrexsee/core/browser/RexseeBrowserStyle$1;-><init>(Lrexsee/core/browser/RexseeBrowserStyle;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 45
    :goto_0
    iget-boolean v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->syncTag:Z

    if-eqz v0, :cond_0

    .line 52
    return-void

    .line 47
    :cond_0
    const-wide/16 v0, 0x14

    :try_start_0
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 48
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public startAnimation(Ljava/lang/String;)V
    .locals 2
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 63
    iget-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    iget-object v1, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v0, v1, p1}, Lrexsee/core/widget/Div;->animate(Lrexsee/core/browser/Browser;Ljava/lang/String;)V

    .line 64
    return-void
.end method

.method public stopAnimation()V
    .locals 1

    .prologue
    .line 66
    iget-object v0, p0, Lrexsee/core/browser/RexseeBrowserStyle;->mDiv:Lrexsee/core/widget/Div;

    invoke-virtual {v0}, Lrexsee/core/widget/Div;->stopAnimate()V

    .line 67
    return-void
.end method
